package com.duoduo.springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 *  OrderConsulController
 *
 * @author qian
 * @version 1.0
 * @date 2020/11/19 16:58
 */
@RestController
public class OrderConsulController {

    public static final String PAYMENT_URL = "http://cloud-provider-payment-consul8006";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/consumer/payment/consul")
    public String paymentzk() {
        String response = restTemplate.getForObject(PAYMENT_URL + "/payment/zk", String.class);
        return response;
    }
}
